const path = require("path");

const getPath = (fileName) => path.join(__dirname, "../", fileName);

module.exports = {
  // session key
  sessionKey: "ceshi010001",
  server: {
    name: "youn-node-basic",
    port: 80
  },
  static: [
    "public",
    { 
      name: "/files", 
      path: getPath('files') 
    },
    {
      name: "/learn",
      path: getPath("learn")
    }
  ],
  devServer: {
    cors: {
      open: true,
      withePath: [
        "http://localhost"
      ]
    }
  },
  dbConfig: {
    mysql: {
      host: "127.0.0.1",
      user: "root",
      password: "yang0323",
      database: "base-util"
    }
  }
}